<!--
 * @Author: your name
 * @Date: 2021-10-06 13:24:28
 * @LastEditTime: 2021-10-14 21:55:30
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue3.0\vue3_vite\src\pages\Ref_learn\unref.vue
-->
<template>
  <h1>unref</h1>

  <a-typography>

    <a-typography-title>count</a-typography-title>
    <a-typography-paragraph>
      <p>{{ count }}</p>  
    </a-typography-paragraph> 

    <a-typography-title>count2</a-typography-title>
    <a-typography-paragraph>
      <p>{{ count2 }}</p> 
    </a-typography-paragraph> 
    
  </a-typography>
</template>

<script>
import { ref, unref, onMounted } from 'vue'

export default {
  setup(props) {
    const count = ref(1)
    let count2 = 2

    onMounted(() => {
      console.log('count', count)
      console.log('count', unref(count))
      console.log('count2', unref(count2))
    })  

    return {
      count,
      count2,
    }
  }
}
</script>

<style>

</style>